package com.app.micaihu.view.bean

import com.app.micaihu.bean.speak.IAttUser
import com.app.micaihu.bean.speak.ILaud
import com.app.micaihu.configure.TypeConstant
import java.io.Serializable

data class Arms(
        val buttonList: List<Button>
) {
    data class Button(
            val id: String,
            val logo: String,
            val title: String,
            val type: String,
            val desc: String,
            val url: String
    )
}


data class Military(
        val id: Int,
        val name: String,
        val icon: Int,
        var check: Boolean = false
)

data class TopNewsGroup(
        val date: String,
        val news: List<TopNewsChild>
) {
    data class TopNewsChild(
            val articleDate: String,
            val articleId: String,
            val articleSummary: String,
            val articleTime: String,
            val articleTitle: String,
            val articleType: String
    )
}

data class AccountConflict(
        val clashUser: ClashUser?,
        val currentUser: CurrentUser?
) {
    data class ClashUser(
            val gold: String,
            val headPic: String,
            val militaryRank: String,
            val militaryTime: String,
            val mobile: String,
            val nickName: String,
            val score: String,
            val uid: String,
            val rankIcon: String,
            val rankName: String,
            val registerTime: String,
            val clashDesc: String
    )

    data class CurrentUser(
            val gold: String,
            val headPic: String,
            val militaryRank: String,
            val militaryTime: String,
            val mobile: String,
            val nickName: String,
            val score: String,
            val uid: String,
            val rankIcon: String,
            val rankName: String,
            val registerTime: String,
            val clashDesc: String
    )

}

data class QuestionList(
        val cmtList: List<Cmt>,
        val lastGetTime: String,
        val topicInfo: List<Any>,
        val armyGroupInfo: ArmyGroupInfo?,
        val armyGroupUpgradeStatus: Boolean,
        val mission: Mission?

) {
    data class Cmt(
            val cmtList: List<CmtX>,
            val content: String,
            val ctype: String,
            val headPic: String,
            val id: String,
            val imgList: ArrayList<String>,
            val isFans: String,
            val nickName: String,
            val praiseNum: String,
            val publishTime: String,
            val rankIcon: String,
            val rankName: String,
            val replyNum: String,
            var status: String,
            val title: String,
            val topicId: String,
            val type: String,
            val armyTitle: String,
            val honourPic: String,
            val armyGroupInfo: String,
            val uid: String
    ) : ILaud, IAttUser {
        override fun getIAttType(): String {
            return status
        }

        override fun setIAttType(statu: String?) {
            status = statu.toString()
        }

        data class CmtX(
                val childList: List<Any>,
                val childNum: String,
                val content: String,
                val headPic: String,
                val id: String,
                val isFans: String,
                val nickName: String,
                val pNickName: String,
                val pUid: String,
                val parentCmtId: String,
                val praiseNum: String,
                val publishTime: String,
                val rankIcon: String,
                val rankName: String,
                val replyNum: String,
                val timestamp: String,
                val topicId: String,
                val type: String,
                val honourPic: String,
                val armyGroupInfo: String,
                val uid: String
        )

        override fun setIToUid(toUid: kotlin.String?) {

        }

        override fun setILaudNum(iLaudNum: kotlin.String?) {

        }

        override fun getILaudType(): kotlin.String {
            return TypeConstant.COMMENT_ONE
        }

        override fun getILaudNum(): kotlin.String {
            return praiseNum
        }

        override fun getILaudOperateType(): kotlin.String {
            return TypeConstant.ZAN_NORMAL
        }

        override fun getIType(): kotlin.String {
            return TypeConstant.COMMENT_PARENT
        }

        override fun getICommentId(): kotlin.String {
            return id
        }

        override fun getNewsId(): kotlin.String {
            return topicId
        }

        override fun getIToUid(): kotlin.String {
            return uid
        }

        override fun getIParentCmtId(): kotlin.String {
            return "0"
        }
    }

}

data class Mission(
        val missionList: List<MissionX>?,
        val signIn: List<SignIn>?
)

data class MissionX(
        val taskAllProgress: Int,
        val taskBtn: String,
        val taskCurrentProgress: Int,
        val taskDesc: String,
        val taskGold: Int,
        val taskIcon: String,
        val taskName: String,
        val type: Int //1 出操;2 评论;3点赞;4 阅读资讯;5 发帖
)

data class SignIn(
        val isFinish: Boolean,
        val taskAllProgress: String,
        val taskBtn: String,
        val taskCurrentProgress: String,
        val taskDesc: String,
        val taskGold: String,
        val taskIcon: String,
        val taskName: String,
        val type: Int
)

data class ArmyList(
        val armyGroupList: List<ArmyGroup>,
        val myArmyGroup: MyArmyGroup?
) {
    data class ArmyGroup(
            val addtime: String,
            val description: String,
            val gid: String,
            val gold: String,
            val icon: String,
            val level: String,
            val member: String,
            val memberLimit: String,
            val title: String,
            val tag: List<String>,
            val warZone: String
    )

    data class MyArmyGroup(
            val addtime: String,
            val description: String,
            val gid: String,
            val gold: String,
            val icon: String,
            val level: String,
            val member: String,
            val memberLimit: String,
            val status: String,
            val title: String,
            val warZone: String
    )
}

data class ArmyDetail(
        val armyGroupInfo: ArmyGroupInfo?,
        val memberList: List<Member>?,
        /**
         * 客户端展示判断，0绿色申请按钮，1您已加入军团，2您已申请其他军团，3您已加入其他军团， 4已申请，等待通过，5已拒绝
         */
        val userArmyGroupStatus: Int,

        val armyGroupUpgradeStatus: Boolean,//军团是否可以升级

        val levelDesc: LevelDesc?
) {


    data class Member(
            val avatar: String,
            val uid: String
    )

    data class Honour(
            val icon: String,
            val name: String
    )

    data class LevelDesc(
            val condition: Condition?,
            val current: Current?,
            val lelveH5: String,
            val next: Next?
    ) {
        data class Condition(
                val auth: String,
                val consumeGold: String,
                val goldStatus: Boolean,
                val memberLimit: String,
                val memberStatus: Boolean
        )

        data class Current(
                val auth: String,
                val memberLimit: String,
                val memberStatus: Boolean,
                val name: String,
                val signInGold: String,
                val goldStatus: Boolean
        )

        data class Next(
                val auth: String,
                val memberLimit: String,
                val name: String,
                val signInGold: String
        )
    }

}

data class ArmyGroupInfo(
        val addtime: String,
        val description: String,
        val gold: String,
        val honour: List<ArmyDetail.Honour>,
        val icon: String,
        val id: String,
        val level: String,
        val member: String,
        val member_limit: String,
        val originator: String,
        val status: Int,
        val title: String,
        val notice: String?,
        var rankListUrl: String,
        val war_zone: String
)

//Serializable
data class ArmyMember(
        val adminList: List<Admin>,
        val memberList: List<Member>?
) : Serializable {
    data class Admin(
            var attentionStatus: String,
            var grade: String,
            val avatar: String,
            val nickname: String,
            val position: String,
            val uid: String,
            var showSelect: Boolean,
            var select: Boolean
    ) : IAttUser, Serializable {
        override fun getIToUid(): String {
            return uid
        }

        override fun setIToUid(toUid: String?) {
            uid
        }

        override fun getIAttType(): String {
            return attentionStatus
        }

        override fun setIAttType(status: String?) {
            attentionStatus = status.toString()
        }

    }

    data class Member(
            var attentionStatus: String,
            var grade: String,
            val avatar: String,
            val nickname: String,
            val position: String,
            val uid: String,
            var showSelect: Boolean,
            var select: Boolean
    ) : IAttUser, Serializable {
        override fun getIToUid(): String {
            return uid
        }

        override fun setIToUid(toUid: String?) {
            uid
        }

        override fun getIAttType(): String {
            return attentionStatus
        }

        override fun setIAttType(status: String?) {
            attentionStatus = status.toString()
        }

    }
}

data class ArmySign(
        val joinDays: Int,
        val gold: Int,
        val desc: String
)

data class ArmyMessage(
        val armyInfo: ArmyInfo?,
        val datetime: String,
        val from_uid: String,
        val gid: Int,
        val msg: String,
        val rankIcon: String,
        val rankName: String,
        val avatar: String,
        val nickname: String,
        var status: Int,
        val to_uid: String,
        val ts: Int,
        val type: Int
) {
    data class ArmyInfo(
            val addtime: String,
            val description: String,
            val gold: String,
            val honour: List<Honour>,
            val icon: String,
            val id: String,
            val level: String,
            val member: String,
            val member_limit: String,
            val originator: String,
            val status: String,
            val title: String,
            val war_zone: String
    )

    data class Honour(
            val icon: String,
            val name: String
    )
}

data class ArmyGrade(
        val level: String,
        val permission: Int,
        val name: String
)


data class ArmyCurrentMember(
        val currentLevel: String,
        val currentNum: String,
        val memberList: List<ArmyMember.Member>,
        val totleNum: Int
)

data class ArmyCreateInfo(
        val mobileStatus: Boolean,
        val postStatus: Boolean,
        val signStatus: Boolean,
        val notice: String,
        val noticeImg: String,
        val tag: List<String>?,
        val armyIcon: List<String>?,
        val warZone: List<String>?
)

data class ArmyIcon(
        val icon: String,
        var select: Boolean
)


data class ArmyHonour(
        val activityHonour: List<Honour>,
        val activityNum: String,
        val armyHonour: List<Honour>,
        val armyHonourNum: String,
        val userHonour: List<Honour>,
        val userHonourNum: String,
        val userInfo: UserInfo?
)

data class Honour(
        val icon: String,
        val name: String
)

data class UserInfo(
        val avatar: String,
        val honourCount: Int,
        val nickname: String
)


data class ArmyUpgrade(
        val levelStr: String,
        val desc: String
)
data class SignGold(
        val militarPay: Int
)


